home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Guide Interactive 5
/
PC Guide Issue 5 (Future Publishing) (1995).iso
/
win95
/
mdialogs.dir
/
00061_Script_61
< prev
next >
Wrap
Text File
|
1995-05-22
|
3KB
|
113 lines
-- dialogs movie scripts
on startmovie
if the machineType = 256 then
set the exitlock to TRUE
end if
end
on setSprites default
global gCurrDialogButtonDM
put default into gCurrDialogButtonDM
puppetSprite 2,1
puppetSprite 3,1
if the castNum of sprite 4 <> 0 then
puppetSprite 4,1
end if
end
on keyDown
global gCurrDialogButtonDM
if voidP(gCurrDialogButtonDM) then put 2 into gCurrDialogButtonDM
put gCurrDialogButtonDM into lastsprite
if the Key = TAB then
--hilite next or previous button
if the castNum of sprite 4 = 0 then put 3 into limit
else put 4 into limit
if not the shiftDown then
if lastSprite < limit then
set gCurrDialogButtonDM = gCurrDialogButtonDM+1
else
set gCurrDialogButtonDM = 2
end if
else
if lastSprite = 2 then
set gCurrDialogButtonDM = limit
else
set gCurrDialogButtonDM = gCurrDialogButtonDM-1
end if
end if
-- de hilite the last sprite that was hilited
set c = the castNum of sprite lastsprite
set the castNum of sprite lastsprite = c -1
set c = the castNum of sprite gCurrDialogButtonDM
set the castNum of sprite gCurrDialogButtonDM = c+1
updateStage
else if the key = RETURN or the key = ENTER then
hiliteButton lastSprite
mouseDown(script the scriptNum of sprite (lastsprite))
end if
end
on dialogButtonChoice c
global gDialogResult,gDialogCallBack
put c into gDialogResult
-- return the the button choice to the main movie by calling the calling handler
-- and passing the response
if count(the windowList) > 0 then -- we're running in the main movie
tell the stage
do gDialogCallBack
end tell
else
beep
--alert c
end if
end
on hiliteButton s
-- hilite the suckers by moving down and up a pixel
if voidP(s) then
--alert string(the lastClick)
if the lastClick < 20 then
put the clickOn into s
else
exit
end if
end if
put the locH of sprite s into h
put the locV of sprite s into v
set the locH of sprite s to h + 2
set the locV of sprite s to v + 2
updateStage
wait
set the locH of sprite s to h
set the locV of sprite s to v
wait
updateStage
end
on dialogWidth
return the width of sprite 1
end
on dialogHeight
return the height of sprite 1
end
on wait t
if voidP(t) then set t = 10
startTimer
repeat while the timer < t
nothing
end repeat
end